package com.ronri.ams.sample;


import android.os.Bundle;

import com.cz.nongyetongv5.application.InitApplication;

import java.util.HashMap;
import java.util.Map;

import static com.cz.nongyetongv5.application.InitApplication.gSampleInfo;


/**
 * Created by Administrator on 2017/5/21.
 */

public class activity_select_breed extends activity_control_single_select {

    /****
     * 覆盖创建
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {

        String szRemoteAddress = InitApplication.SystemConfig.getBase().RemoteAddress(
                InitApplication.SystemConfig.getModule().getSampleslist().getAddress());

        setParamets(szRemoteAddress, "breed_name", "breed_name");

        super.onCreate(savedInstanceState);
    }

    /***
     * 格式化参数
     * @param nPageIndex
     * @param nPageSize
     * @param Paramerts
     * @return
     */
    @Override
    public String MergeRemoteParamerts(int nPageIndex, int nPageSize, Map<String, Object> Paramerts) {
        Map<String, Object> oReturn = new HashMap<>();
        if(Paramerts != null) {
            if (Paramerts.containsKey("breed_name"))
                oReturn.put("breed_name", Paramerts.get("breed_name"));
        }

        oReturn.put("breed_id", gSampleInfo.getTaskbreed());


        return super.MergeRemoteParamerts(nPageIndex, nPageSize, oReturn);
    }
}
